<?php
class Prof_Form_SimpleQuest extends Zend_Form{
	public function init(){
		$this->setMethod('post');
		
		$obj = new Zend_Form_Element_Text('enonce');
		$obj	->setLabel('Question')
				->setRequired(true)
				->setAttrib('class', 'validate[required,minSize[3]]')
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty')
				->addValidator(new Zend_Validate_StringLength(3))
				->setDecorators(array('ViewHelper'));
		$this->addElement($obj);
		
		$good = new Zend_Form_Element_Text('reponse');
		$good	->setLabel('Good Response')
				->setRequired(true)
				->setAttrib('class', 'validate[required]')
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty')
				->setDecorators(array('ViewHelper'));
		$this->addElement($good);
		
		$hiddenID = new Zend_Form_Element_Hidden('id_qcm');
		$hiddenID	->setDecorators(array('ViewHelper'));
		$this->addElement($hiddenID);
		
		$hidden = new Zend_Form_Element_Hidden('num_quest');
		$hidden	->setDecorators(array('ViewHelper'));
		$this->addElement($hidden);
		
		$submit = new Zend_Form_Element_Submit('submit');
		$submit	->setLabel('Send')
				->setDecorators(array('ViewHelper'));
		$this->addElement($submit);
	}
}